package homework;

class Cat {
    private String color;
    private String breed;
    public Cat(){

    }
    public Cat(String color,String breed){
        this.color = color;
        this.breed = breed;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public void eat(){
        System.out.println(color +"的"+breed+"正在吃鱼.....");
    }
    public void catchMouse(){
        System.out.println(color +"的"+breed+"正在逮老鼠.....");
    }
}
class Dog {
    private String color;
    private String breed;
    public Dog(){

    }
    public Dog(String color,String breed){
        this.color = color;
        this.breed = breed;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public void eat(){
        System.out.println(color +"的"+breed+"正在啃骨头.....");
    }
    public void lookHome(){
        System.out.println(color +"的"+breed+"正在看家.....");
    }
}
public class TestAnimal {
    public static void main(String[] args) {
        Cat cat = new Cat();
        cat.setColor("花色");
        cat.setBreed("波斯猫");
        cat.eat();
        cat.catchMouse();
        Dog dog = new Dog();
        dog.setColor("黑色");
        dog.setBreed("藏獒");
        dog.eat();
        dog.lookHome();
    }
}
